Optimal. Leaf size=123 \[ \frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \sin (a+b x) \cos ^2(a+b x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3311, 3296, 2637, 2633} \[ \frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \sin (a+b x) \cos ^2(a+b x)}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2633
Rule 2637
Rule 3296
Rule 3311
Rubi steps
\begin {align*} \int (c+d x)^2 \cos ^3(a+b x) \, dx &=\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2}{3} \int (c+d x)^2 \cos (a+b x) \, dx-\frac {\left (2 d^2\right ) \int \cos ^3(a+b x) \, dx}{9 b^2}\\ &=\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}-\frac {(4 d) \int (c+d x) \sin (a+b x) \, dx}{3 b}+\frac {\left (2 d^2\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (a+b x)\right )}{9 b^3}\\ &=\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {2 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {\left (4 d^2\right ) \int \cos (a+b x) \, dx}{3 b^2}\\ &=\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.62, size = 93, normalized size = 0.76 \[ \frac {2 \sin (a+b x) \left (\cos (2 (a+b x)) \left (9 b^2 (c+d x)^2-2 d^2\right )+45 b^2 (c+d x)^2-82 d^2\right )+162 b d (c+d x) \cos (a+b x)+6 b d (c+d x) \cos (3 (a+b x))}{108 b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 128, normalized size = 1.04 \[ \frac {6 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )^{3} + 36 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) + {\left (18 \, b^{2} d^{2} x^{2} + 36 \, b^{2} c d x + 18 \, b^{2} c^{2} + {\left (9 \, b^{2} d^{2} x^{2} + 18 \, b^{2} c d x + 9 \, b^{2} c^{2} - 2 \, d^{2}\right )} \cos \left (b x + a\right )^{2} - 40 \, d^{2}\right )} \sin \left (b x + a\right )}{27 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.45, size = 137, normalized size = 1.11 \[ \frac {{\left (b d^{2} x + b c d\right )} \cos \left (3 \, b x + 3 \, a\right )}{18 \, b^{3}} + \frac {3 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )}{2 \, b^{3}} + \frac {{\left (9 \, b^{2} d^{2} x^{2} + 18 \, b^{2} c d x + 9 \, b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (3 \, b x + 3 \, a\right )}{108 \, b^{3}} + \frac {3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (b x + a\right )}{4 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.03, size = 265, normalized size = 2.15 \[ \frac {\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{2}}-\frac {2 a \,d^{2} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{2}}+\frac {2 c d \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b}+\frac {a^{2} d^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b^{2}}-\frac {2 a c d \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b}+\frac {c^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.38, size = 267, normalized size = 2.17 \[ -\frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} c^{2} - \frac {72 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a c d}{b} + \frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a^{2} d^{2}}{b^{2}} - \frac {6 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} c d}{b} + \frac {6 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} a d^{2}}{b^{2}} - \frac {{\left (6 \, {\left (b x + a\right )} \cos \left (3 \, b x + 3 \, a\right ) + 162 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left (9 \, {\left (b x + a\right )}^{2} - 2\right )} \sin \left (3 \, b x + 3 \, a\right ) + 81 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} d^{2}}{b^{2}}}{108 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.59, size = 173, normalized size = 1.41 \[ \frac {\frac {d^2\,x\,\cos \left (3\,a+3\,b\,x\right )}{18}+\frac {3\,c\,d\,\cos \left (a+b\,x\right )}{2}+\frac {c\,d\,\cos \left (3\,a+3\,b\,x\right )}{18}+\frac {3\,d^2\,x\,\cos \left (a+b\,x\right )}{2}}{b^2}+\frac {\frac {3\,c^2\,\sin \left (a+b\,x\right )}{4}+\frac {c^2\,\sin \left (3\,a+3\,b\,x\right )}{12}+\frac {3\,d^2\,x^2\,\sin \left (a+b\,x\right )}{4}+\frac {d^2\,x^2\,\sin \left (3\,a+3\,b\,x\right )}{12}+\frac {3\,c\,d\,x\,\sin \left (a+b\,x\right )}{2}+\frac {c\,d\,x\,\sin \left (3\,a+3\,b\,x\right )}{6}}{b}-\frac {3\,d^2\,\sin \left (a+b\,x\right )}{2\,b^3}-\frac {d^2\,\sin \left (3\,a+3\,b\,x\right )}{54\,b^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.22, size = 284, normalized size = 2.31 \[ \begin {cases} \frac {2 c^{2} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {c^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {4 c d x \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {2 c d x \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 d^{2} x^{2} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {d^{2} x^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {4 c d \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{3 b^{2}} + \frac {14 c d \cos ^{3}{\left (a + b x \right )}}{9 b^{2}} + \frac {4 d^{2} x \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{3 b^{2}} + \frac {14 d^{2} x \cos ^{3}{\left (a + b x \right )}}{9 b^{2}} - \frac {40 d^{2} \sin ^{3}{\left (a + b x \right )}}{27 b^{3}} - \frac {14 d^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{9 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \cos ^{3}{\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________